/**
 * 
 */
package cn.g31010.sip.pojo;

import java.util.MissingResourceException;

import org.json.JSONException;
import org.json.JSONObject;

import com.gqf.common.util.DynamicResource;

/**
 * @author user
 *
 */
public class User implements java.io.Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6606293692758618116L;
	private String id;
	private String name;
	private String nickName;
	private String passwd;
	private long registerDate;
	private long lastLoginTime;
	private String status;
	public String getId() {
		return this.id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getNickName() {
		return this.nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	public String getPasswd() {
		return this.passwd;
	}
	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}
	public long getRegisterDate() {
		return this.registerDate;
	}
	public void setRegisterDate(long registerDate) {
		this.registerDate = registerDate;
	}
	public long getLastLoginTime() {
		return this.lastLoginTime;
	}
	public void setLastLoginTime(long lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((this.id == null) ? 0 : this.id.hashCode());
		return result;
	}
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final User other = (User) obj;
		if (this.id == null) {
			if (other.id != null)
				return false;
		} else if (!this.id.equals(other.id))
			return false;
		return true;
	}
	public String toString() {
		JSONObject jso=new JSONObject(this);
		return jso.toString();
	}	
	
	
	public static void main(String args[]){
		try {
			JSONObject json=new JSONObject(DynamicResource.getString("jsons", "user"));
			System.out.println(json.get("owner"));
		} catch (MissingResourceException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	public String getStatus() {
		return this.status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	
}
